package cn.pn.project.client.schedule;


import cn.pn.project.client.schedule.follback.CommoditySessionFallBack;
import cn.pn.project.pojo.schedule.Commoditysession;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.sql.SQLException;
import java.util.List;

@FeignClient(name="pn-scheduler-provider",fallback = CommoditySessionFallBack.class)
public interface CommoditySessionFeign {

    /**
     * 根据场次id查询场次信息
     * @param sessionIds
     * @return
     */
    @RequestMapping(value = "/getCommoditysessionBySessionId",method = RequestMethod.POST)
    public Object getCommoditysessionBySessionId(@RequestParam("sessionIds") String sessionIds) throws SQLException;


    /**
     * 根据场地id查询场次信息
     * @param placeId
     * @return
     * @throws SQLException
     */
    @RequestMapping(value = "/getCommoditysessionByPlaceId",method = RequestMethod.POST)
    public Object getCommoditysessionByPlaceId(@RequestParam("placeId") Integer placeId) throws SQLException;


    /**
     * 根据场地id和场次时间查询场次id
     * @param placeId
     * @param sessionTime
     * @return
     * @throws SQLException
     */
    @RequestMapping(value = "getCommoditysessionByPlaceIdAndSessionTime",method = RequestMethod.POST)
    public Commoditysession getCommoditysessionByPlaceIdAndSessionTime(@RequestParam("placeId")Integer placeId,@RequestParam("sessionTime")String sessionTime ) throws SQLException;



}
